Skip to content

Bound inserted-sequence suffix comparisons#2696

Open
justinblethrow-cloud wants to merge 1 commit into
alexdobin:masterfrom
justinblethrow-cloud:fix-bounded-insert-suffix-comparator
Open

Bound inserted-sequence suffix comparisons#2696
justinblethrow-cloud wants to merge 1 commit into
alexdobin:masterfrom
justinblethrow-cloud:fix-bounded-insert-suffix-comparator

Conversation

@justinblethrow-cloud

Copy link
Copy Markdown

Summary

  • Bound inserted-sequence suffix comparisons by the allocated sequence buffer.
  • Interpret genomeSuffixLengthMax as a number of bases, consistently with genome generation.
  • Stop comparisons at the genome spacing sentinel and return equality for self-comparisons.
  • Add a focused ASan/UBSan regression test.

Problem

Runtime sequence insertion (alignReads --genomeFastaFiles ...) passes the default unlimited suffix length into this comparator. On 2.7.11b, the caller divides that value by sizeof(uint64_t) and memcmp receives 2,305,843,009,213,693,951 bytes. ASan aborts in funCompareUintAndSuffixesMemcmp; the comparator also returns a nonzero result when given the same element twice.

Validation

  • extras/tests/scripts/testSuffixComparator.sh passes with ASan/UBSan; the same test against unmodified 2.7.11b fails in memcmp.
  • A full STAR build succeeds.
  • Runtime sequence insertion with the default suffix-length setting completes under ASan.
  • Resulting SAM records are byte-identical to mapping against the equivalent prebuilt index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant